package com.rs.game.player.dialogues;

import com.rs.game.WorldTile;
import com.rs.game.player.content.Magic;
import com.rs.game.player.controlers.Falconry;
import com.rs.game.player.controlers.FightKiln;

public class Azzanadra extends Dialogue {

	public void start() {
		sendOptionsDialogue("Minigames Teleports", "Fight Pits", "Fight Caves", "Fight Kiln", "Clan Wars", "More Options");
	}

	public void run(int interfaceId, int componentId) {
		if (stage == -1) {
			if (componentId == OPTION_1) {// Fight Pits
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(4601, 5061, 0));
			} else if (componentId == OPTION_2) {// Fight Caves
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(4611, 5129, 0));
			} else if (componentId == OPTION_3) {// Fight Kiln
				Magic.sendNormalTeleportSpell(player, 0, 0, FightKiln.OUTSIDE);
			} else if (componentId == OPTION_4) {// Clan wars
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2995, 9679, 0));
			} else if (componentId == OPTION_5) {// More Options
				sendOptionsDialogue("Minigames Teleports", "Barrows", "Dominion Tower", "Castle Wars", "Warriors Guild", "Falconry");
				stage = 6;
			}
		} else if (stage == 6) {
			if (componentId == OPTION_1) {// Barrows
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3565, 3289, 0));
			} else if (componentId == OPTION_2) {// Dominion Tower
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3366, 3083, 0));
			} else if (componentId == OPTION_3) {// Castle Wars
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2442, 3090, 0));
			} else if (componentId == OPTION_4) {// Warriors Guild
				Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2878, 3542, 0));			
			} else if (componentId == OPTION_5) {// Falconry
				if (player.getEquipment().hasShield() || player.getEquipment().hasTwoHandedWeapon() || player.getEquipment().getWeaponId() != -1) {
					player.getPackets().sendGameMessage("Please free your hands before going here.");
					end();
				} else {
					Falconry.beginFalconry(player);
				}
			}
		}
	}

	public void finish() {
	}
}